<?php
/**
 * Created by PhpStorm.
 * User: czm
 * Date: 2019/5/6
 * Time: 14:35
 */
namespace app\index\controller;

use think\Controller;
use think\Db;

class Picture extends Controller
{
    // 广告图
    public function picList()
    {
        $contact =Db::name('picture')->field('title,pic')->select();
        if($contact)
        {
            $data = ['code'=>200,'msg'=>'success',$contact  ];
            return json_encode($data,JSON_FORCE_OBJECT);
        }
        else
        {
            $data = ['code'=>403,'msg'=>'field'];
            return json_encode($data,TRUE);

        }
    }
}